package com.qingpeng.pay.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.qingpeng.pay.R;
import com.qingpeng.pay.beans.WithdrawBean;

public class MoneyAdapter extends BaseQuickAdapter<WithdrawBean.DataProductBean, BaseViewHolder> {
    public MoneyAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, WithdrawBean.DataProductBean item) {
        helper.setText(R.id.money, item.getMoney() + "元")
                .setText(R.id.time, item.getCreatime());
        if (item.getStatus().equals("0")) {
            helper.setText(R.id.status, "已提交");
        } else if (item.getStatus().equals("1")) {
            helper.setText(R.id.status, "成功");
        } else if (item.getStatus().equals("2")) {
            helper.setText(R.id.status, "失败");
        }
    }
}
